<?php
/**
 *
 * User: zhaomeng1
 * Date: 2019/5/15
 * Time: 2:29 PM
 *
 */
        include  "Mysql_model.php";

        $my =  mysql::getIns();

while(1){


        $res_lock = $my->query("update order_queue set status = 2 where status =0 limit 20 ");

        if($res_lock){

            $my->query("update order_queue set status = 1,updated_at = '".date('Y-m-d H:i:s' ,time ())."' where status =2 limit 20 ");
        }else{

		break;

	}

}
